<?php

namespace App\Model\Exam;

use App\Model\Model;
use Hyperf\Database\Model\SoftDeletes;

/**
 * @property integer $id
 * @property integer $start_time
 * @property integer $exam_test_id
 * @property integer $submit_time
 * @property json $result
 * @property integer $subject_id
 * @property datetime $create_time
 * @property datetime $update_time
 * @property datetime $delete_time
 */
class ExamTestResult extends Model
{
    use SoftDeletes;
    /**
     * The table associated with the model.
     * 
     * @var string
     */
    protected $table = 'exam_test_result';

    protected $fillable = [
        'start_time',
        'exam_test_id',
        'submit_time',
        'result',
        'subject_id',
        'exam_id',
        'user_id',
        'task_id',
        'create_time',
        'update_time',
        'delete_time',
    ];

    public function Exam(){
        return $this->hasOne(Exam::class,'id','subject_id');
    }

}
